package com.linjiahao.serviceChat;

import com.linjiahao.serviceChat.config.NettyServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan(basePackages = {"com.linjiahao"})
@EnableDiscoveryClient
@EnableFeignClients
public class ChatApplication implements CommandLineRunner {


    @Autowired
    NettyServer nettyServer;

    public static void main(String[] args) {
        SpringApplication.run(ChatApplication.class);
    }
    @Override
    public void run(String... args) throws Exception {
        nettyServer.start();
        System.out.println("netty启动成功");
    }
}
